<template>
  <div class="box">
    <p>数据字典</p>
    <el-divider></el-divider>
    <el-tabs type="border-card">
      <el-tab-pane label="已入库设备状态">已入库设备状态</el-tab-pane>
      <el-tab-pane label="未入库设备状态">未入库设备状态</el-tab-pane>
      <el-tab-pane label="设备分类">
        <ul>
          <li v-for="item in list" :key="item.id">
            {{ item.id }} {{ item.name }}
          </li>
        </ul>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
export default {
  name: "ShuJu",
  data() {
    return {
      list: [],
    };
  },
  methods: {
    // 设备分类函数
    async lists() {
      let res = await this.$axios({
        method: "get",
        url: "/category-list",
        data: this.todata,
      });
      this.list = res.data.data;
      console.log(this.list);
    },
  },
  mounted() {
    this.lists();
  },
};
</script>

<style lang="less" scoped>
.box {
  margin: 20px 10px;
}
.el-tabs__content {
  line-height: 300px;
}
</style>